﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="PlaneDetails.aspx.cs" Inherits="IL2SWA.PlaneDetails" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
    google.load("visualization", "1", { packages: ["corechart"] });
</script> 
<%--<script type="text/javascript">

    $(document).ready(function () {
        $.ajax({
            type: "POST",
            url: "PlaneDetails.aspx/GetPlaneFuel",
            data: "{}",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            async: true,
            success: function (msg) {
                drawGetPlaneFuel(msg.d);
                // Replace the div's content with the page method's return.
                //$("#Result").text(msg.d);
            },
            error: function (result) {
                alert('error occured');
            }
        });
    });

    function drawGetPlaneFuel(dataValues) {

        var data = new google.visualization.DataTable(dataValues);
        new google.visualization.PieChart(document.getElementById('GetPlaneFuel')).
                draw(data, { title: "Plane % Fuel Carried", is3D:true, pieSliceText: 'label' });
    }


</script> --%>
<h1>Planes Flown By</h1>
    <asp:ListBox ID="PlanesFlownInGame" runat="server" AutoPostBack="true"
        onselectedindexchanged="PlanesFlownInGame_SelectedIndexChanged"></asp:ListBox> 
    <p>
        <asp:Label ID="SelectedPlane" runat="server" Text="Label"></asp:Label>
    </p>
    <h3> <asp:Label ID="PlaneDetailsLabel" runat="server" Text=""></asp:Label></h3>
     <p>
     <asp:GridView ID="PlanesFlownOverView" runat="server" emptydatatext="<%$ Resources:Strings, NoPlaneData %>" autogeneratecolumns="false">
         <columns>
            <asp:BoundField HeaderText="<%$ Resources:Strings, Flown %>" DataField="TimesFlown" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
            <asp:BoundField HeaderText="<%$ Resources:Strings, FlightTime %>" DataField="FlightTime" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
            <asp:BoundField HeaderText="<%$ Resources:Strings, AirDestroyedHuman %>" DataField="AirDestroyedHuman" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
            <asp:BoundField HeaderText="<%$ Resources:Strings, AirDestroyedAI %>" DataField="AirDestroyedAI" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
            <asp:BoundField HeaderText="<%$ Resources:Strings, GroundDestroyed %>" DataField="GndDestroyed" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
            <asp:BoundField HeaderText="<%$ Resources:Strings, BridgesDestroyed %>" DataField="BridgesDestroyed" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
            <asp:HyperLinkField HeaderText="<%$ Resources:Strings, WIKIURL %>" DataNavigateUrlFields="WikiURL" DataNavigateUrlFormatString="{0}" DataTextField="WikiURL" ItemStyle-HorizontalAlign="Center" Target="_blank"></asp:HyperLinkField>
          </columns>
          <rowstyle backcolor="LightCyan"  
           forecolor="DarkBlue"
           font-italic="true"/>

        <alternatingrowstyle backcolor="PaleTurquoise"  
          forecolor="DarkBlue"
          font-italic="true"/>
        </asp:GridView>
    </p>
      <p>
     <asp:GridView ID="PlanePilotDetails" runat="server" emptydatatext="<%$ Resources:Strings, NoPlanePilotData %>" autogeneratecolumns="false">
         <columns>
            <asp:HyperLinkField HeaderText="<%$ Resources:Strings, PlayerName %>" DataNavigateUrlFields="PlayerName" DataNavigateUrlFormatString="~/PlayerDetails.aspx?PlayerName={0}" DataTextField="PlayerName" ItemStyle-HorizontalAlign="Center"></asp:HyperLinkField>                         
            <asp:BoundField HeaderText="<%$ Resources:Strings, Flown %>" DataField="TimesFlown" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
            <asp:BoundField HeaderText="<%$ Resources:Strings, FlightTime %>" DataField="FlightTime" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
            <asp:BoundField HeaderText="<%$ Resources:Strings, AirDestroyedHuman %>" DataField="AirDestroyedHuman" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
            <asp:BoundField HeaderText="<%$ Resources:Strings, AirDestroyedAI %>" DataField="AirDestroyedAI" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
            <asp:BoundField HeaderText="<%$ Resources:Strings, GroundDestroyed %>" DataField="GndDestroyed" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
            <asp:BoundField HeaderText="<%$ Resources:Strings, ShotDownHuman %>" DataField="ShotDownByHuman" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
            <asp:BoundField HeaderText="<%$ Resources:Strings, ShotDownAI %>" DataField="ShotDownByAI" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
            <asp:BoundField HeaderText="<%$ Resources:Strings, Landed %>" DataField="Landed" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
            <asp:BoundField HeaderText="<%$ Resources:Strings, Crashed %>" DataField="Crashed" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
            <asp:BoundField HeaderText="<%$ Resources:Strings, BridgesDestroyed %>" DataField="BridgesDestroyed" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
          </columns>
          <rowstyle backcolor="LightCyan"  
           forecolor="DarkBlue"
           font-italic="true"/>

        <alternatingrowstyle backcolor="PaleTurquoise"  
          forecolor="DarkBlue"
          font-italic="true"/>
        </asp:GridView>
    </p>
    <p>
    <asp:GridView ID="PlaneLoadoutDetail" runat="server" emptydatatext="<%$ Resources:Strings, NoPlaneLoadOutData %>" autogeneratecolumns="false">
         <columns>
            <asp:BoundField HeaderText="<%$ Resources:Strings, Loadout %>" DataField="Loadout" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
            <asp:BoundField HeaderText="<%$ Resources:Strings, Used %>" DataField="TimesUsed" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
            <asp:BoundField HeaderText="<%$ Resources:Strings, PercentageFlown %>" DataField="PercentageUseage" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
          </columns>
          <rowstyle backcolor="LightCyan"  
           forecolor="DarkBlue"
           font-italic="true"/>

        <alternatingrowstyle backcolor="PaleTurquoise"  
          forecolor="DarkBlue"
          font-italic="true"/>
        </asp:GridView>
    </p>
    <p>
    <asp:GridView ID="PlaneFuelDetail" runat="server" emptydatatext="<%$ Resources:Strings, NoPlaneFuelData %>" autogeneratecolumns="false">
         <columns>
            <asp:BoundField HeaderText="<%$ Resources:Strings, Fuel %>" DataField="FuelDescription" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
            <asp:BoundField HeaderText="<%$ Resources:Strings, Used %>" DataField="TimesUsed" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
            <asp:BoundField HeaderText="<%$ Resources:Strings, PercentageFlown %>" DataField="PercentageUseage" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
           </columns>
          <rowstyle backcolor="LightCyan"  
           forecolor="DarkBlue"
           font-italic="true"/>

        <alternatingrowstyle backcolor="PaleTurquoise"  
          forecolor="DarkBlue"
          font-italic="true"/>
        </asp:GridView>
    </p>
   <%-- <div id="GetPlaneFuel" style="min-width: 300px; height: 300px; margin: 0 auto"></div>--%>
</asp:Content>
